﻿using System.Web;
using System.Web.Optimization;

namespace ASP.NetAjaxApplication
{
    public class BundleConfig
    {
        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new StyleBundle("~/Content/css").Include(
                        "~/Content/toastr.css",
                        //customize
                        "~/Content/default.css"));

            bundles.Add(new StyleBundle("~/Content/skin/dynatree").Include("~/Content/skin/ui.dynatree.css"));

            bundles.Add(new ScriptBundle("~/bundles/js")
                .Include(
                //library
                    "~/Scripts/jquery-{version}.js",
                    "~/Scripts/jquery-ui-{version}.js",

                    //jquery plug in
                    "~/Scripts/splitter.js",
                    "~/Scripts/jquery.dynatree.js",

                    //knockout
                    "~/Scripts/knockout-{version}.js",
                    "~/Scripts/knockout.mapping-latest.debug.js",

                    //misc
                    "~/Scripts/amplify.js",
                    "~/Scripts/toastr.js",
                    "~/Scripts/app/logger.js",
                    "~/Scripts/app/menu.js"
                ).Include(
                //model
                    "~/Scripts/app/vm.js",
                //data layer
                    "~/Scripts/app/repository.list.js",
                    "~/Scripts/app/repository.rule.js",
                    "~/Scripts/app/repository.lineitem.js",
                    "~/Scripts/app/repository.order.js",
                    "~/Scripts/app/repository.js",

                    //run application
                    "~/Scripts/app/main.js",
                    "~/Scripts/app/gridview.js",
                    "~/Scripts/app/orderTestForm2.js",
                    "~/Scripts/app/vm.addnewclient.js"
                )
            );

            BundleTable.EnableOptimizations = false;
        }
    }
}